package com.dns.reset;

import com.dns.reset.web.service.DbDnsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class MyCommandLineRunner implements CommandLineRunner {
    @Autowired
    private DbDnsService dbDnsService;
    @Override
    public void run(String... strings) throws Exception {
      Integer max=dbDnsService.findMaxNo()==null?0:dbDnsService.findMaxNo();
      dbDnsService.initAtomicInteger(max);
    }
}
